package com.orange.project.base.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.orange.common.base.service.impl.BaseServiceImpl;
import com.orange.common.constant.ServiceConstants;
import com.orange.project.base.mapper.AppMapper;
import com.orange.project.base.pojo.AppDto;
import com.orange.project.base.service.AppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * TODO
 *
 * @Author YWF
 * @Date 2022/1/26 17:01
 */
@Service
public class AppServiceImpl extends BaseServiceImpl<AppMapper, AppDto> implements AppService {

    @Autowired
    private AppMapper appMapper;

    @Override
    public List<AppDto> getAppList() {
        LambdaQueryWrapper<AppDto> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.eq(AppDto::getStatus, ServiceConstants.APP_INFO_STATUS);
        return appMapper.selectList(queryWrapper);
    }
}
